package com.jiang.daily.Q2643;

/**
 * @author Jiang
 * @version 1.0
 * @date 2025/03/22 13:30
 */
class Solution {
    public int[] rowAndMaximumOnes(int[][] mat) {
        int[] res = new int[2];
        for (int i = 0; i < mat.length; i++) {
            int cnt = 0;
            for (int n: mat[i]) {
                if (n == 1) cnt++;
            }
            if (cnt > res[1]) {
                res[0] = i;
                res[1] = cnt;
            }
        }
        return res;
    }
}
